import { createRouter, createWebHashHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const routes = [
  {
    path: '/',
    name: 'home',
    component: () => import(/* webpackChunkName: "about" */ '../views/Index.vue')
  },
  {
    path: '/index',
    name: 'index',
    component: () => import(/* webpackChunkName: "about" */ '../views/Index.vue')
  },
  {
    path: '/about',
    name: 'about',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
  },
  {
    path: '/businessList',
    name: 'businessList',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/BusinessList.vue')
  },
  {
    path: '/businessInfo',
    name: 'businessInfo',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/businessInfo.vue')
  },
  {
    path: '/order',
    name: 'order',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/Order.vue')
  },
  {
    path: '/payment',
    name: 'payment',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/Payment.vue')
  },
  {
    path:'/IndexList',
    name:'IndexList',
    component:() => import('../views/IndexList.vue')
  },
  {
    path:'/Login',
    name:'Login',
    component:() => import('../views/Login.vue')
  },
  {
    path:'/Register',
    name:'Register',
    component:() => import('../views/Register.vue')
  },
  {
    path:'/AboutView',
    name:'AboutView',
    component:() => import('../views/AboutView.vue')
  },
  {
    path:'/UserAddress',
    name:'UserAddress',
    component:() => import('../views/UserAddress.vue')    
  },
  {
    path:'/EditUserAddress',
    name:'EditUserAddress',
    component:() => import('../views/EditUserAddress.vue')    
  }

]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
